<?php
# $Id: default_index.tmpl.php,v 1.3 2006/06/22 14:45:39 diegor Exp $
require('header.php');
$auth = $user->getAttribute('auth');
$stats = $template['stats'];
$posts = $template['posts'];
$logged = $template['logged'];
?>
<script src="<?=WEB_MODULE_DIR?>js/mootools-core.js" type="text/javascript"></script>
<script src="<?=WEB_MODULE_DIR?>js/mootools-more.js" type="text/javascript"></script>
<script language="javascript" src="<?=WEB_MODULE_DIR?>js/shoutbox/js/jquery.js" type="text/javascript"></script>
<script language="javascript" src="<?=WEB_MODULE_DIR?>js/shoutbox/js/yshout.js" type="text/javascript"></script>
<script type="text/javascript">
new YShout({
	   yPath: 'http://localhost/shoutbox/',
	   log: 1
	});

</script>
<script language="javascript">
function submitthis()
{
    document.adminForm.submit();
}
</script>
<div id="toolbar-box">
  <div class="m">
    <div class="toolbar-list" id="toolbar">
      <!-- TOOL BAR MENU ex:HELP|NEW|EDIT-->
      <!-- END TOOL BAR MENU -->
      <div class="clr"></div>
    </div>
    <div class="pagetitle icon-48-cpanel"><h2><?=$config['version']?></h2></div>
     <!-- [</?=strtoupper($auth['privilege'])?>]-->
  </div>
</div>
<div>
  <span><h2>&nbsp;&nbsp;&nbsp;::CONTROL PANEL::</h2><span>
<div>
<div id="element-box">
  <div class="m" >
    <div class="adminform">
      <div class="cpanel-left">
        <div id="cpanel">
        <!-- CONTROL PANEL-->
          <div style="icon-wrapper">
            <div class="icon">
              <a class="toolbar" href="?module=<?=DEFAULT_MODULE?>&action=AddressBook">
                <img src="<?=WEB_MODULE_DIR?>images/generic.png" align="middle" name="new" border="0"><br>Contact Manager
              </a>
            </div>
          </div>
          <div style="icon-wrapper">
            <div class="icon">
              <a class="toolbar" href="?module=<?=DEFAULT_MODULE?>&action=GroupManagement">
                <img src="<?=WEB_MODULE_DIR?>images/user.png" align="middle" name="new" border="0"><br>Group Manager
              </a>
            </div>
          </div>
          <div style="icon-wrapper">
            <div class="icon">
              <a class="toolbar" href="?module=<?=DEFAULT_MODULE?>&action=TemplateEditor">
                <img src="<?=WEB_MODULE_DIR?>images/addedit.png" align="middle" name="new" border="0"><br>Template Editor
              </a>
            </div>
          </div>
          <div style="icon-wrapper">
            <div class="icon">
              <a class="toolbar" href="?module=<?=DEFAULT_MODULE?>&action=PresetMessages">
                <img src="<?=WEB_MODULE_DIR?>images/addedit.png" align="middle" name="new" border="0"><br>Preset Messages
              </a>
            </div>
          </div>
          <div style="icon-wrapper">
            <div class="icon">
              <a class="toolbar" href="?module=<?=DEFAULT_MODULE?>&action=Transaction">
                <img src="<?=WEB_MODULE_DIR?>images/categories.png" align="middle" name="new" border="0"><br>Transaction Manager
              </a>
            </div>
          </div>
          <div style="icon-wrapper">
            <div class="icon">
              <a class="toolbar" href="?module=<?=DEFAULT_MODULE?>&action=Poll">
                <img src="<?=WEB_MODULE_DIR?>images/poll.png" align="middle" name="new" border="0"><br>Poll Messaging
              </a>
            </div>
          </div>
          <div style="icon-wrapper">
            <div class="icon">
              <a class="toolbar" href="?module=<?=DEFAULT_MODULE?>&action=Maintenance">
                <img src="<?=WEB_MODULE_DIR?>images/systeminfo.png" align="middle" name="new" border="0"><br>Maintenance
              </a>
            </div>
          </div>
          <div style="icon-wrapper">
            <div class="icon">
              <a class="toolbar" href="?module=<?=DEFAULT_MODULE?>&action=PollIndex">
                <img src="<?=WEB_MODULE_DIR?>images/langmanager.png" align="middle" name="new" border="0"><br>Poll
              </a>
            </div>
          </div>
        <!--END OF CONTROL PANEL-->
        </div>
      </div>
      <div class="cpanel-right">
        <div>
          <div style="display:none;"><div>
        </div>
      </div>
      <div class="panel">
        <div class="tab-page" id="modules-cpanel">
          <script type="text/javascript">
            var tabPane1 = new WebFXTabPane( document.getElementById( "modules-cpanel" ), 1 )
          </script>
          <div class="tab-page" id="tab1ElementId">
            <h2 class="tab">Events</h2>
            <script type="text/javascript">
              tabPane1.addTabPage( document.getElementById( "tab1ElementId" ) );
            </script>
            <table class="adminlist">
              <tr>
                <th colspan="22">Message Board</th>
              </tr>
              <tr>
                <td>
                  <div id="yshout"></div>
                </td>
              </tr>
            </table>
          </div> 
          <div class="tab-page" id="tab1ElementId">
            <h2 class="tab">Logged</h2>
            <script type="text/javascript">
              tabPane1.addTabPage( document.getElementById( "tab1ElementId" ) );
            </script>
            <!-- CURRENTLY LOGGED IN USERS -->
            <table class="adminlist">
              <tr>
                <th colspan="22">Currently Logged In Users</th>
              </tr>
              <?php
                if ($logged)
                  foreach ($logged as $id => $log) {
                    $color = ($id/2 == round($id/2)) ? "row0" : "row1";
                ?>
              <tr class="<?=$color?>">
                <td width="30%"><?= $log['login'];?></td>
                <td align="center"><?= $log['privilege'];?></td>
              </tr>
              <?php
                }else{
              ?>
              <tr>
                <td colspan="2">No online users</td>
              </tr>
              <?php
                }
              ?>
            </table>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<div class="clr"></div>
</div>
</div>
</div>
</div>
</div>
</br>
<?php require('footer.php'); ?>
</body>
</html>




